//
//  LSIntercontinentalMatchCell.m
//  LookScore
//
//  Created by wr on 2018/1/31.
//  Copyright © 2018年 ChongQingXunTiCompany. All rights reserved.
//

#import "LSIntercontinentalMatchCell.h"

@interface LSIntercontinentalMatchCell()

@property(strong,nonatomic)UIImageView *intercontinentalImg;

@property(strong,nonatomic)UILabel *intercontinentalLab;


@end
@implementation LSIntercontinentalMatchCell

+(LSIntercontinentalMatchCell *)IntercontinentalMatchCellByTableView:(UITableView *)tableView{
    LSIntercontinentalMatchCell *cell=[tableView dequeueReusableCellWithIdentifier:NSStringFromClass(self)];
    if (!cell) {
        cell=[[LSIntercontinentalMatchCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass(self)];
        cell.selectionStyle=UITableViewCellSelectionStyleNone;
        
    }
    return cell;
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.backgroundColor=[UIColor whiteColor];
        [self addContentView];
    }
    
    return self;
}

-(void)addContentView{

    UIImageView *intercontinentalImg=[[UIImageView alloc]init];
    [self.contentView addSubview:intercontinentalImg];
    self.intercontinentalImg=intercontinentalImg; intercontinentalImg.sd_layout.leftEqualToView(self.contentView).offset(LSSpaceLeftWidth1).topEqualToView(self.contentView).offset(5).widthIs(30).bottomEqualToView(self.contentView).offset(-5);
    
    UILabel *intercontinentalLab=[[UILabel alloc]init];
    intercontinentalLab.font=LSFontSize13;
    intercontinentalLab.textColor=[UIColor blackColor];
    [self.contentView addSubview:intercontinentalLab];
    self.intercontinentalLab=intercontinentalLab;
        intercontinentalLab.sd_layout.leftSpaceToView(intercontinentalImg, 10).centerYEqualToView(self.contentView).heightIs(self.contentView.height).autoWidthRatio(8);
    

    UIButton *rightBu=[UIButton new];
    [rightBu setImage:[UIImage imageNamed:@"MineRightLightGray"] forState:UIControlStateNormal];
    rightBu.userInteractionEnabled=NO;
    [self.contentView addSubview:rightBu];
    rightBu.sd_layout.leftSpaceToView(intercontinentalLab, 10).rightEqualToView(self.contentView).offset(-LSSpaceLeftWidth1).heightIs(20).widthIs(20).centerYEqualToView(self.contentView);

    

    
    UIView *lineView=[[UIView alloc]init];
    lineView.backgroundColor=LSLineGrayColor;
    [self.contentView addSubview:lineView];
    lineView.sd_layout.leftEqualToView(self.contentView).bottomEqualToView(self.contentView).rightEqualToView(self.contentView).heightIs(.5f);
//    [self fasleData];
}
- (void)setModel:(LSIntercontinentalModel *)model{
    _model = model;
    self.intercontinentalLab.text = model.LeagueName;
    [self.intercontinentalImg sd_setImageWithURL:[NSURL URLWithString:InfoLeagueImageHeaderUrl(model.LeagueImage)] placeholderImage:[UIImage imageNamed:@"logoNull"] options:SDWebImageRefreshCached];
//    self.intercontinentalImg.image=[UIImage imageNamed:model.LeagueImage];
}

//-(void)fasleData{
//
//
//}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
